//
// Created by hjie on 23-7-16.
//

#pragma once

#include <vector>
#include <cstring>
#include <string>
#include <memory>
#include <map>
#include "user_data.h"

class DataManager;

class UserDataManager
{
public:
    UserDataManager(DataManager * data_manager);
    ~UserDataManager();
    bool AddUser(const std::string & user_id);
    bool RemoveUserById(const std::string & id);
    std::shared_ptr<UserData> GetUserById(const std::string & id);
    int GetUserSize();
    std::map<std::string, std::shared_ptr<UserData>> GetUserMap();
private:
    DataManager * m_data_manager;
private:
    std::map<std::string, std::shared_ptr<UserData>> m_id_user_map;
};
